<template>
	<view class="container">
		<view>
			<desc-wrapper :title="title" :desc="desc"></desc-wrapper>
			<!-- <z-card justifyContent="center">
				<view v-for="(item, idx) in yunshiList" class="flex-col" :key="idx">
					<view>
                        <view v-if="!typeof resp[item] == 'object'" class="enhance-text">{{ item }}:{{ resp[item] }}</view>
                        <view v-else class="enhance-text">{{ item }}:</view>
                    </view>

					<view v-if="typeof resp[item] === 'object'" class="flex-1 card-content-item flex-col dividing_line">
						<view v-for="(item1, idx1) in Object.keys(resp[item])" :key="idx1">
							<text class="card-content-label_left shrink-0 score-text">{{ item1 }}:</text>
							<text class="">{{ resp[item][item1] }}</text>
						</view>
					</view>
				</view>
			</z-card> -->
			<z-card justifyContent="center" :title="resp.运势类型+'今日运势'">
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-red">【速配星座】</text>
					<view class="card-content_right">
						{{resp.今日运势.速配星座}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-green">【提防星座】</text>
					<view class="card-content_right">
						{{resp.今日运势.提防星座}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-orange">【幸运颜色】</text>
					<view class="card-content_right">
						{{resp.今日运势.幸运颜色}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-lightblue">【幸运数字】</text>
					<view class="card-content_right">
						{{resp.今日运势.幸运数字}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-purple">【幸运宝石】</text>
					<view class="card-content_right">
						{{resp.今日运势.幸运宝石}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-deepblue">【综合分数】</text>
					<view class="card-content_right">
						{{resp.今日运势.综合分数}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【今日运势】</text>
					<view class="card-content_right">
						{{resp.今日运势.今明运势}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【爱情分数】</text>
					<view class="card-content_right">
						{{resp.今日运势.爱情分数}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【爱情运势】</text>
					<view class="card-content_right">
						{{resp.今日运势.爱情运势}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【事业分数】</text>
					<view class="card-content_right">
						{{resp.今日运势.事业分数}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【事业运势】</text>
					<view class="card-content_right">
						{{resp.今日运势.事业运势}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【财富分数】</text>
					<view class="card-content_right">
						{{resp.今日运势.财富分数}}
					</view>
				</view>

				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【财富运势】</text>
					<view class="card-content_right">
						{{resp.今日运势.财富运势}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【健康分数】</text>
					<view class="card-content_right">
						{{resp.今日运势.健康分数}}
					</view>
				</view>
				<view class="card-content-item">
					<text class="card-content-label_left shrink-0 card-text-brown">【健康运势】</text>
					<view class="card-content_right">
						{{resp.今日运势.健康运势}}
					</view>
				</view>
			</z-card>
			<view class="bottom-btns" style="transform: translateY(-100%);" @click="todashi">
				<view class="start-btn">
					<text>大师详解</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '每日运势',
				desc: '每日运势分析：分析结果如下，请自行体会其中的指示。',
				resp: null,
				yunshiList: []
			}
		},
		onLoad(opt) {
			this.resp = JSON.parse(opt.params)
			this.yunshiList = Object.keys(this.resp)
			console.log(this.resp)
			console.log(this.yunshiList)
		},
		methods: {
			todashi(){
				uni.switchTab({
					url:'/pages/tabbar/service'
				})
			}
		}
	}
</script>
<style lang="scss"></style>